package pzl.com.threadlocal.tasks;

import android.util.Log;

import pzl.com.threadlocal.beans.Index;
import pzl.com.threadlocal.utils.Util2;

/**
 * @author zl.peng
 * @version [1.0, 2016-11-15]
 */
public class Thread2 extends Thread {

    @Override
    public void run() {
        Log.e("pzl", Thread.currentThread().getName() + " start ");
        Index index = Util2.getLocal().get();
        int i = 0;
        while (i < 5) {
            index.increase();
            i++;
        }
        Log.e("pzl", Thread.currentThread().getName() + " : " + Util2.getLocal().get().num());
    }

}
